  <div class="Top">
    <div class="float_right lang">
     <%#render :partial=>'layouts/online_im'%>
     <%if params[:project_id]%>
       <%=@cur_user.project_role(@project)%> - 
     <%end%>
     <%=@cur_user.global_role.to_s.t %> 
     <%=link_to @cur_user.name,person_path(@cur_user)%> |
     <%=link_to 'Logout'.t,"/login/logout"%> 
     <%=render :partial=>'layouts/lang'%>
     <span>
     </span>
    </div>
    <span style="margin-left:30px;" class="<%=(Globalize::Locale.language.to_s == "Chinese" ? "":"small_font_link")%>">
      <%=com_link "Dashboard".t,'/dashboard'%> |
      <%=com_link 'All Todos'.t, "/todos"%> |
      <%if @cur_user.account_owner? or @cur_user.administrator? or @cur_user.global_user?%>
      <%=com_link 'Time Report'.t,"/statistic"%> |
      <%end%>
      <%=com_link 'All people'.t,"/people"%>
      <%#com_link 'All Projects'.t, "/projects"%>
      <%#com_link 'Permissions'.t,"/permission"%>
      <%#com_link 'Settings'.t,"global","setting"%>
      <%if @project%>
      | 
      <span id='choose_pj_label'><%=link_to "Choose a project".t + "...",'#',:class=>'comm',:onclick=>"Element.show('choose_pj_form');Element.hide('choose_pj_label')"%></span> 
      <span id='choose_pj_form' style="display:none">
        <strong><%="Choose a project".t%>:</strong>
	<select id='projectSelector' onchange="selectProject(this)"> 
	  <optgroup label="<%="Your Projects".t%>">
	    <%=options_from_collection_for_select (@cur_user.account_owner? ? @cur_user.company.active_projects : @cur_user.active_projects),'id','name',params[:project_id].to_i%>
	  </optgroup>
	</select>
	<%=link_to"Cancel".t,'#',:class=>'admin',:onclick=>"Element.show('choose_pj_label');Element.hide('choose_pj_form')"%>
      </span> 
      <%end%>
      <%if @cur_user.have_power?%>
      | 
	<select id='adminSelector' onchange="selectAdminLink(this)"> 
	  <option value=""><%="Admin links".t%></option>
	  <option value="/projects?act=new"><%="Add a Project".t%></option>
	  <option value="/projects"><%="Projects Lists".t%></option>
	  <option value="/permission"><%="Global Permissions".t%></option>
	  <option value="/global/setting"><%="System Settings".t%></option>
	</select>
      <%end%>
  </div>
